#!/bin/bash
status=$(protonvpn status | head -n1 | awk '{print $2}')

if [ "$status" == "Connected" ]; then 
	alacritty -e sudo protonvpn d
	echo "#90c861" > /tmp/xmonad/vpnstat-hex
else 
	alacritty -e sudo protonvpn c
	echo "#D35D6E" > /tmp/xmonad/vpnstat-hex
fi
